package StructuralPattern.Decorator;

/**
 * @Classname : SwimCarDecorator
 * @Description : 具体装饰者
 * @Author : chentianyu
 * @Date 2023/2/15 23:27
 */


public class SwimCarDecorator extends AbstractCarDecorator {

    public SwimCarDecorator(Car car) {
        super(car);
    }

    public void run() {
        super.run();
        this.swim();
    }

    // 装饰方法
    private void swim() {
        System.out.println("水里游");
    }
}
